# 统计目标文件夹下有多少文件

import os

dir_path = '../data/data_for_train_balance_with_equalize_hist'

# 统计各个分文件夹下文件数量
path_dict = {}
for parent, _, files in os.walk(dir_path):
    path_dict[parent] = 0
    for file in files:
        path_dict[parent] += 1

count = 0
for key in path_dict:
    count += path_dict[key]
    print(key, path_dict[key])

print("abnorm", count - path_dict[dir_path + '/norm'])
